<!DOCTYPE html>
<html>
<head>
<title>维度词库</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<link rel="stylesheet" href="../../css/bootstrap.min.css">
<link rel="stylesheet" href="../../css/font-awesome.min.css">
<link rel="stylesheet" href="../../css/AdminLTE.min.css">
<link rel="stylesheet" href="../../css/all-skins.min.css">
<link rel="stylesheet" href="../../plugins/jqgrid/ui.jqgrid-bootstrap.css">
<link rel="stylesheet" href="../../plugins/ztree/css/metroStyle/metroStyle.css">
<link rel="stylesheet" href="../../css/bootstrap-table.min.css">
<link rel="stylesheet" href="../../css/main.css">
<link rel="stylesheet" href="../../plugins/treegrid/jquery.treegrid.css">

<script src="../../libs/jquery.min.js"></script>
<script src="../../plugins/layer/layer.js"></script>
<script src="../../libs/bootstrap.min.js"></script>
<script src="../../libs/vue.min.js"></script>
<script src="../../libs/bootstrap-table.min.js"></script>
<script src="../../plugins/treegrid/jquery.treegrid.min.js"></script>
<script src="../../plugins/treegrid/jquery.treegrid.bootstrap3.js"></script>
<script src="../../plugins/treegrid/jquery.treegrid.extension.js"></script>
<script src="../../plugins/treegrid/tree.table.js"></script>
<script src="../../plugins/jqgrid/grid.locale-cn.js"></script>
<script src="../../plugins/jqgrid/jquery.jqGrid.min.js"></script>
<script src="../../plugins/ztree/jquery.ztree.all.min.js"></script>
<script src="../../js/common.js"></script>
</head>
<body>
	<div id="rrapp" v-cloak>
		<div v-show="showList">
			<form class="form-horizontal" style="width: 700px;">
			<div class="box-body">
				<div class="form-group">
					<label for="inputPassword3" class="col-sm-1  col-md-2 control-label">一维：</label>
					<div class="col-sm-4">
						<select class="form-control" v-model="selected1" >
							<option>全部</option>
							<option v-for="item in dim1" :value="item.id" >{{ item.name }}</option>
						</select>
					</div>
					<label for="inputPassword3" class="col-sm-1  col-md-2 control-label">二维：</label>
					<div class="col-sm-4">
						<select class="form-control" v-model="selected2" >
							<option>全部</option>
							<option v-for="item in dim2" :value="item.id" >{{ item.name }}</option>
						</select>
					</div>
					<label for="inputPassword3" class="col-sm-1  col-md-2 control-label">三维：</label>
					<div class="col-sm-4">
						<select class="form-control" v-model="selected3" >
							<option>全部</option>
							<option v-for="item in dim3" :value="item.id" >{{ item.name }}</option>
						</select>
					</div>
					<label for="inputPassword3" class="col-sm-1 col-md-2 control-label">四维：</label>
					<div class="col-sm-4 col-md-4">
						<select class="form-control" v-model="selected4" >
							<option>全部</option>
							<option v-for="item in dim4" :value="item.id" >{{ item.name }}</option>
						</select>
					</div>
					<label for="inputPassword3" class="col-sm-1 col-md-2 control-label">维度：</label>
					<div class="col-sm-4 col-md-4">
						<input type="text" class="form-control" v-model="selected6" placeholder="维度" />
					</div>
					<label for="inputPassword3" class="col-sm-1 col-md-2 control-label">属性：</label>
					<div class="col-sm-4 col-md-4">
						<input type="text" class="form-control" v-model="selected5" placeholder="属性" />
					</div>
					<label for="inputPassword3" class="col-sm-1 col-md-2 control-label"></label>
					<div class="col-sm-4 col-md-4">
					</div>
					<label for="inputPassword3" class="col-sm-1 col-md-2 control-label"></label>
					<div class="col-sm-4 col-md-4">
						<a class="btn btn-default" @click="clearTreeGrid">查询</a> 
					</div>
				</div>
			</div>
		</form>
			<div class="grid-btn">
				&nbsp;&nbsp;&nbsp;&nbsp;
				<a v-if="hasPermission('dimension:save')" class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>
				&nbsp;新增</a> 
				<a v-if="hasPermission('dimension:update')" class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>
				&nbsp;修改</a> 
				<a v-if="hasPermission('dimension:delete')" class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>
				&nbsp;删除</a> 
				<a class="btn btn-primary" @click="downexcel"><i class="fa fa-download"></i>&nbsp;导出</a>
			</div>
			<table id="menuTable" data-mobile-responsive="true" data-click-to-select="true">
				<thead>
					<tr>
						<th data-field="selectItem" data-checkbox="true"></th>
					</tr>
				</thead>
			</table>
		</div>

		<div v-show="!showList" class="panel panel-default">
			<div class="panel-heading">{{title}}</div>
			<form class="form-horizontal">
				<div class="form-group">
					<div class="col-sm-2 control-label">维度</div>
					<div class="col-sm-10">
						<input type="text" class="form-control editHide" v-model="dimension.name" placeholder="维度" />
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-2 control-label">上级维度</div>
					<div class="col-sm-10">
						<input type="hidden" class="form-control" v-model="dimension.parentId" placeholder="父ID" /> <input type="text" class="form-control" style="cursor: pointer;" v-model="dimension.parentName" @click="menuTree" readonly="readonly" placeholder="主维度" />
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-2 control-label">属性</div>
					<div class="col-sm-10">
						<input type="text" class="form-control" v-model="dimension.type" placeholder="属性" />
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-2 control-label">权重</div>
					<div class="col-sm-10">
					<input type="text" class="form-control" v-model="dimension.weight" placeholder="权重" />
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-2 control-label">描述</div>
					<div class="col-sm-10">
						<textarea class="form-control" rows="3" v-model="dimension.description" placeholder="描述" style="margin: 0px -0.5px 0px 0px; height: 78px; width: 509px;"></textarea>
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-2 control-label"></div>
					<input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定" /> &nbsp;&nbsp; <input type="button" class="btn btn-warning" @click="reload" value="返回" />
				</div>
			</form>
		</div>
	</div>

	<!-- 选择菜单 -->
	<div id="menuLayer" style="display: none; padding: 10px;">
		<ul id="menuTree" class="ztree"></ul>
	</div>
	<script src="../../js/modules/biz/dimension.js"></script>
</body>
</html>